package com.shoppingcart.service;

import com.shoppingcart.entity.Shoppingcart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shoppingcart.entity.vo.ShoppingcartVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author guanfenga@yonyou.com
 * @since 2023-02-15
 */
public interface IShoppingcartService extends IService<Shoppingcart> {

    /**
     * 根据用户id查询购物车信息
     * @param userId
     * @return
     */
    List<ShoppingcartVo> queryShoppingcartToUserId(String userId);

    /**
     * 向购物车添加信息
     * @param shoppingcart
     * @return
     */
    int saveShoppingcart(Shoppingcart shoppingcart);

    /**
     * java8 新特性练习
     * @param shoppingcart
     * @return
     */
    List<Shoppingcart> queryJava8ShoppingCart(Shoppingcart shoppingcart);
}
